
<style>
    .header-top{
        background: #282828 !important;
        color: #B4B4B4 !important;
    }
    .top-nav-right{
        background: #282828 !important;
        color: #B4B4B4 !important;
    }
    .header-top a{
        color: #B4B4B4 !important;
    }
    .top-nav-right a{
        color: #B4B4B4 !important;
    }
    /* 弹窗的样式 */
.modal {
    z-index: 999999 !important;
  display: none; /* 默认隐藏 */
  position: fixed;
  z-index: 1; /* 位于顶层 */
  left: 0;
  top: 0;
  width: 100%; /* 全屏宽度 */
  height: 100%; /* 全屏高度 */
  background-color: rgba(0,0,0,0.5); /* 半透明背景 */
}
 
.modal-content {
  background-color: #fefefe;
  margin: 15% auto; /* 垂直居中 */
  padding: 20px;
  border: 1px solid #888;
  width: 300px;
  position: relative;
}
 
/* 关闭按钮的样式 */
.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    -webkit-box-shadow: 0 0 0.6rem rgba(0, 0, 0, 0.4);
    -moz-box-shadow: 0 0 0.6rem rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0.6rem rgba(0, 0, 0, 0.4);
    opacity: 1;
    background: #555555;
    color: #fff;
    border: 0.1rem solid #f4f4f4;
    width: 2.6rem;
    height: 2.6rem;
    z-index: 1;
    line-height: 2rem;
    font-weight: 100;
    font-size: 1.8rem;
}
 
.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}
</style>
<script>
    function dywz(){
        console.log('sss');
        var modal = document.getElementById('myModal');
        modal.style.display = "block";
    }
    function bk(){
        console.log('wwww');
    }
</script>
{{if MyC('home_main_top_header_status', 1) eq 1}}
    <!-- 顶部导航条 start -->
    <div class="header-top">
        <div class="am-container header">
            <ul class="top-nav-left top-nav-left-content am-hide-sm-only">
                <div class="top-nav-items">
                    <div class="menu-hd">
                        <!-- 公共顶部小导航钩子-左侧前面 -->
                        {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                      
                            <div class="plugins-tag">
                                <span>plugins_view_header_navigation_top_left_begin</span>
                            </div>
                        {{/if}}
                        {{if !empty($plugins_view_header_navigation_top_left_begin_data) and is_array($plugins_view_header_navigation_top_left_begin_data)}}
                            {{foreach $plugins_view_header_navigation_top_left_begin_data as $hook}}
                                {{if is_string($hook) or is_int($hook)}}
                                    {{$hook|raw}}
                                {{/if}}
                            {{/foreach}}
                        {{/if}}
                        <!-- <a href="javascript:;" data-am-dropdown-toggle>
                            <span onclick="dywz()" style="cursor: pointer;margin-right: 10px;"><img  style="margin-top: -2px;width: 12px;height: 12px;"
                                src="{{:staticAttachmentUrl('dywz.png')}}"><span>
                                    訂閱本站
                                </span>
                            </span>
                        </a> -->
                        <a href="{{:MyUrl('index/article/category')}}">
                            <span onclick="bk()" style="cursor: pointer;margin-right: 10px;"><img  style="margin-top: -2px;width: 12px;height: 12px;"
                                src="{{:staticAttachmentUrl('bk.png')}}"><span>
                                    博客
                                </span></span>
                        </a>
                        {{if empty($user)}}
                            <em class="first">{{:MyLang('common.header_top_nav_left_not_login_first')}}</em>
                            <em class="site-name">{{:MyC('home_site_name')}}</em>
                            {{if !empty($home_user_login_type)}}
                                [<a href="{{:MyUrl('index/user/logininfo')}}">{{:MyLang('common.login_title')}}</a>]
                            {{/if}}
                            {{if !empty($home_user_reg_type)}}
                                [<a href="{{:MyUrl('index/user/reginfo')}}">{{:MyLang('common.register_title')}}</a>]
                            {{/if}}
                        {{else /}}
                            <em class="first">{{:MyLang('common.header_top_nav_left_login_first')}}</em>
                            {{if !empty($user['icon'])}}
                                <img src="{{$user.icon}}" class="common-user-icon" {{if !empty($user['icon_title'])}}title="{{$user.icon_title}}"{{/if}} />
                            {{/if}}
                            <em class="user">{{$user.user_name_view}}</em>
                            <em class="last">{{:MyLang('common.header_top_nav_left_login_last')}}</em>
                            <em class="site-name">{{:MyC('home_site_name')}}</em>
                            <em class="logout"><a href="{{:MyUrl('index/user/logout')}}">[{{:MyLang('common.logout_title')}}]</a></em>
                        {{/if}}

                        <!-- 公共顶部小导航钩子-左侧后面 -->
                        {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                            <div class="plugins-tag">
                                <span>plugins_view_header_navigation_top_left_end</span>
                            </div>
                        {{/if}}
                        {{if !empty($plugins_view_header_navigation_top_left_end_data) and is_array($plugins_view_header_navigation_top_left_end_data)}}
                            {{foreach $plugins_view_header_navigation_top_left_end_data as $hook}}
                                {{if is_string($hook) or is_int($hook)}}
                                    {{$hook|raw}}
                                {{/if}}
                            {{/foreach}}
                        {{/if}}
                    </div>
                </div>
            </ul>

            <div class="top-nav-left top-nav-left-site-logo am-show-sm-only">
                <a href="{{$home_url}}">
                    <img class="am-height" src="{{:AttachmentPathViewHandle(MyC('home_site_logo_wap'))}}" alt="{{:MyC('home_seo_site_title')}}" />
                </a>
            </div>

            <ul class="top-nav-right">
                <!-- 公共顶部小导航钩子-右侧前面 -->
                {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                    <div class="plugins-tag">
                        <span>plugins_view_header_navigation_top_right_begin</span>
                    </div>
                {{/if}}
                {{if !empty($plugins_view_header_navigation_top_right_begin_data) and is_array($plugins_view_header_navigation_top_right_begin_data)}}
                    {{foreach $plugins_view_header_navigation_top_right_begin_data as $hook}}
                        {{if is_string($hook) or is_int($hook)}}
                            {{$hook|raw}}
                        {{/if}}
                    {{/foreach}}
                {{/if}}

                <!-- 非首页则展示首页入口 -->
                {{if MyC('home_header_top_is_home', 0) eq 1 and $module_name.$controller_name.$action_name neq 'indexindexindex'}}
                    <div class="top-nav-items top-nav-items-home">
                        <div class="menu-hd">
                            <a href="{{$home_url}}">
                                <i class="iconfont icon-index"></i>
                                <span>{{:MyLang('common.shop_home_title')}}</span>
                            </a>
                        </div>
                    </div>
                {{/if}}

                <!-- 右侧导航 -->
                {{if !empty($common_nav_top_right_list) and is_array($common_nav_top_right_list)}}
                    {{foreach $common_nav_top_right_list as $nav}}
                        {{if empty($nav['items'])}}
                            <div class="top-nav-items {{if !empty($nav['type'])}}top-nav-items-{{$nav.type}}{{/if}}">
                                <div class="menu-hd {{if isset($nav['is_login']) and $nav['is_login'] eq 1 and empty($user)}}login-event{{/if}}">
                                    <a href="{{if empty($user)}}javascript:;{{else /}}{{$nav.url}}{{/if}}">
                                        {{if IsUrl($nav['icon'])}}
                                            <img src="{{$nav.icon}}" class="nav-icon am-vertical-align-middle" />
                                        {{else /}}
                                            <i class="iconfont {{$nav.icon}} am-vertical-align-middle"></i>
                                        {{/if}}
                                        <span class="am-vertical-align-middle">{{$nav.name}}</span>
                                        {{if isset($nav['badge']) and $nav['badge'] gt -1}}
                                            {{if $nav['badge'] gt 0}}
                                                <strong class="am-badge am-badge-danger am-round am-badge-tips {{if isset($nav['type']) and $nav['type'] eq 'cart'}}common-cart-total{{/if}}">{{$nav.badge}}</strong>
                                            {{else /}}
                                                <strong class="am-round {{if isset($nav['type']) and $nav['type'] eq 'cart'}}common-cart-total{{/if}}">{{$nav.badge}}</strong>
                                            {{/if}}
                                        {{/if}}
                                    </a>
                                </div>
                            </div>
                        {{else /}}
                            <div class="top-nav-items {{if !empty($nav['type'])}}top-nav-items-{{$nav.type}}{{/if}}">
                                <div class="am-dropdown menu-hd" data-am-dropdown>
                                    <a class="am-dropdown-toggle" href="javascript:;" data-am-dropdown-toggle>
                                        {{if IsUrl($nav['icon'])}}
                                            <img src="{{$nav.icon}}" class="nav-icon am-vertical-align-middle" />
                                        {{else /}}
                                            <i class="iconfont {{$nav.icon}} am-vertical-align-middle"></i>
                                        {{/if}}
                                        <span class="am-vertical-align-middle">{{$nav.name}}</span>
                                        <i class="am-icon-angle-down am-vertical-align-middle"></i>
                                    </a>
                                    <ul class="am-dropdown-content am-radius">
                                        {{foreach $nav.items as $navs}}
                                            <!-- 是否为事件类型和事件值数据格式 -->
                                            {{if isset($navs['event_type']) and isset($navs['event_value'])}}
                                                <li class="nav-event-item" {{if !empty($navs['data_value'])}}data-value="{{$navs.data_value}}"{{/if}}>
                                                    {{if isset($navs['event_type']) and isset($navs['event_value']) and in_array($navs['event_type'], [3,4])}}
                                                        {{switch navs.event_type}}
                                                            {{case 3}}
                                                                <!-- 地图 -->
                                                                <a href="javascript:;" {{if !empty($navs['event_value_data']) and isset($navs['event_value_data'][2]) and isset($navs['event_value_data'][3]) and $navs['event_value_data'][2] neq 0 and $navs['event_value_data'][3] neq 0}}class="submit-map-popup am-flex am-flex-items-center" data-lng="{{$navs['event_value_data'][2]}}" data-lat="{{$navs['event_value_data'][3]}}"{{/if}}>
                                                                    <p class="nav-images am-margin-right-xs" style="{{if !empty($navs['bg_color'])}}background:{{$navs.bg_color}};{{/if}}">
                                                                        {{if (!empty($navs['icon']) or !empty($navs['images_url'])) and !empty($navs['name'])}}
                                                                            <img src="{{if !empty($navs['icon'])}}{{$navs.icon}}{{else /}}{{$navs.images_url}}{{/if}}" alt="{{$navs.name}}" class="am-width am-block" />
                                                                        {{/if}}
                                                                    </p>
                                                            {{/case}}
                                                            {{case 4}}
                                                                <!-- 电话 -->
                                                                <a {{if !empty($navs['event_value'])}}href="tel:{{$navs.event_value}}"{{else /}}href="javascript:;"{{/if}} class="am-flex am-flex-items-center">
                                                                    <p class="nav-images am-margin-right-xs" style="{{if !empty($navs['bg_color'])}}background:{{$navs.bg_color}};{{/if}}">
                                                                    {{if (!empty($navs['icon']) or !empty($navs['images_url'])) and !empty($navs['name'])}}
                                                                        <img src="{{if !empty($navs['icon'])}}{{$navs.icon}}{{else /}}{{$navs.images_url}}{{/if}}" alt="{{$navs.name}}" class="am-width am-block" />
                                                                    {{/if}}
                                                                </p>
                                                            {{/case}}
                                                        {{/switch}}
                                                    {{else /}}
                                                        <!-- 默认url地址 -->
                                                        <a {{if !empty($navs['event_value'])}}href="{{$navs.event_value}}"{{else /}}href="javascript:;"{{/if}} class="am-flex am-flex-items-center">
                                                            <p class="nav-images am-margin-right-xs" style="{{if !empty($navs['bg_color'])}}background:{{$navs.bg_color}};{{/if}}">
                                                                {{if (!empty($navs['icon']) or !empty($navs['images_url'])) and !empty($navs['name'])}}
                                                                    <img src="{{if !empty($navs['icon'])}}{{$navs.icon}}{{else /}}{{$navs.images_url}}{{/if}}" alt="{{$navs.name}}" class="am-width am-block" />
                                                                {{/if}}
                                                            </p>
                                                    {{/if}}
                                                    <p class="am-text-truncate">{{$navs.name}}</p>
                                                    </a>
                                                </li>
                                            {{else /}}
                                                <!-- 默认为标准名称和url格式 -->
                                                {{if !empty($navs['name'])}}
                                                    <li class="{{if ((isset($nav['is_login']) and $nav['is_login'] eq 1) or (isset($navs['is_login']) and $navs['is_login'] eq 1)) and empty($user)}}login-event{{/if}}">
                                                        <a class="am-flex am-flex-items-center" href="{{if ((isset($nav['is_login']) and $nav['is_login'] eq 1) or (isset($navs['is_login']) and $navs['is_login'] eq 1)) and empty($user)}}javascript:;{{else /}}{{$navs.url}}{{/if}}">
                                                            {{if !empty($navs['icon']) or !empty($navs['images_url'])}}
                                                                <p class="nav-images am-margin-right-xs" >
                                                                <img src="{{if !empty($navs['icon'])}}{{$navs.icon}}{{else /}}{{$navs.images_url}}{{/if}}" alt="{{$navs.name}}" class="am-width am-block" />
                                                                </p>
                                                            {{/if}}
                                                            <p class="am-text-truncate">{{$navs.name}}</p>
                                                        </a>
                                                    </li>
                                                {{/if}}
                                            {{/if}}
                                        {{/foreach}}
                                    </ul>
                                </div>
                            </div>
                        {{/if}}
                    {{/foreach}}
                {{/if}}

                <!-- 公共顶部小导航钩子-右侧后面 -->
                {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                    <div class="plugins-tag">
                        <span>plugins_view_header_navigation_top_right_end</span>
                    </div>
                {{/if}}
                {{if !empty($plugins_view_header_navigation_top_right_end_data) and is_array($plugins_view_header_navigation_top_right_end_data)}}
                    {{foreach $plugins_view_header_navigation_top_right_end_data as $hook}}
                        {{if is_string($hook) or is_int($hook)}}
                            {{$hook|raw}}
                        {{/if}}
                    {{/foreach}}
                {{/if}}
            </ul>
        </div>
    </div>
    <!-- 顶部导航条 end -->
{{/if}}
<div id="myModal" class="modal">
    <!-- 模态内容 -->
    <div class="modal-content">
      <span class="close">&times;</span>
      <p>这里是弹窗内容！</p>
    </div>
  </div>